ts_headers = files(
  'ts.h',
  )
ts_sub_headers = files(
  'gpio.h',
  'hall.h',
  'h_bridge.h',
  'pid.h',
  'timer.h',
  'motor.h',
  )
ts_sources = files(
  'gpio.c',
  'hall.c',
  'h_bridge.c',
  'pid.c',
  'timer.c',
  'motor.c',
)
ts_c_args = []
gio_dep = dependency('gio-2.0')
glib_dep = dependency('glib-2.0')
#soup_dep = dependency('libsoup-2.4')
sqlite3_dep = dependency('sqlite3')
mosquitto_dep = dependency('libmosquitto')
xml2_dep = dependency('libxml-2.0')
json_glib_dep = dependency('json-glib-1.0')
libts = library('ts-1.0',
  sources : [ts_sources],
  version : library_version,
  soversion : soversion,
  install : true,
  link_args : [glib_link_flags],
  include_directories : configinc,
  dependencies : [gio_dep, glib_dep,
    #soup_dep,
    sqlite3_dep, mosquitto_dep,
    xml2_dep,
    #json_glib_dep,
    ],
  c_args : ts_c_args,
  objc_args : ts_c_args,
  )
libts_dep = declare_dependency(
  link_with : libts,
  dependencies : [],
  include_directories : [configinc, tsinc])

pkg.generate(libts,
  libraries : [libintl_deps],
  libraries_private : [],
  subdirs : ['ts-1.0'],
  extra_cflags : ['-I${libdir}/ts-1.0/include'],
  variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
               ],
  version : ts_version,
  install_dir : ts_pkgconfigreldir,
  filebase : 'ts-1.0',
  name : 'Ts',
  description : 'ts Utility Library',
)

